package com.tanhua.domain.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

/**
 * @author
 * @date 2021/01/26
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "follow_user")
public class FollowUser implements Serializable {
    /**主键id*/
    private ObjectId id;
    /**用户id*/
    @Indexed
    private Long userId;
    /**关注了谁*/
    @Indexed
    private Long followUserId;
    /**关注时间*/
    private Long created;
}